<?php
###############   COPYLEFT GPLv3 LICENSE   ###############
##
## JFX Version 0.2.7
## Website Management Software
## www.jfxcms.com
##
## Copyright 2009 GPLv3 - http://www.opensource.org/licenses/gpl-3.0.html
##
## Anthony Gallon
## oi_antz@hotmail.com
##
## Permission is hereby granted to any person having a copy of this software
## to freely use and modify as required so long as the copyright notices
## and branding remain intact.
##
## Full license details available at http://www.jfxcms.com/license
##
###############   COPYLEFT GPLv3 LICENSE   ###############

$queries = file_get_contents($dirname.'/tables.sql');
$queries = str_replace('prefix_', $CONFIG->dbprefix, $queries);

$queries = explode(';', $queries);
foreach($queries as $q){
    if(trim($q)=='') continue;
    $DB->query($q);
}

$css = <<<CSS


.antz3col-container{
    width: 100%;
    float: left;
    background-color: #CCC;
    color: black;
}

.antz3col-content{
    width: 60%;
    float: left;
    position: relative;
    left: 20%;
    background-color: #999;
    color: black;
}

.antz3col-left{
    width: 18%;
    margin: 0 1%;
    float: left;
    position: relative;
    left: -60%;
    background-color: #999;
    color: black;
}

.antz3col-right{
    width: 18%;
    margin: 0 1%;
    float: left;
    background-color: #999;
    color: black;
}

CSS;

$dbParams = array(
    'keyname' => 'antz3collayout',
    'is_default' => 1,
    'sorting' => 0,
    'browser_version' => ''
);

$cssid = $DB->insert($CONFIG->dbprefix.'jfxcss_stylesheets', $dbParams);

$fh = fopen($this->dirname.'/files/'.$cssid.'.css', 'w');
fwrite($fh, $css);
fclose($fh);


/**
 * IE6 hacks for 3 column layout
 */


$css = <<<CSS

.jfx-page{
    height: 800px;
}
.antz3col-left{
    width: 18%;
    left: -59%;
}
.antz3col-content{
    width: 59.5%;
}
.antz3col-right{
    width: 18%;
}



CSS;

$dbParams = array(
    'keyname' => 'antz3collayoutIE6hack',
    'is_default' => 1,
    'sorting' => 0,
    'browser_version' => 'lt IE 7'
);

$cssid = $DB->insert($CONFIG->dbprefix.'jfxcss_stylesheets', $dbParams);

$fh = fopen($this->dirname.'/files/'.$cssid.'.css', 'w');
fwrite($fh, $css);
fclose($fh);







/**
 * Form styles
 */


$css = <<<CSS

/*
    Document   : forms
    Created on : 27/02/2009, 10:48:19 PM
    Author     : antz
    Description:
        Purpose of the stylesheet follows.
*/

/*
   TODO customize this sample style
   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
*/

form h1, form h2, form h3, form h4, form h5, form h6{
    clear: both;
}

textarea{
    width: 300px;
    height: 160px;
    float: left;
}

.form-field{
    margin: 8px 0;
    clear: left;
    float: left;
}

.form-field label{
    float: left;
    width: 160px;
}

.form-field .input-area{
    margin-left: 160px;
}

.form-field input[type=text], .form-field input[type=password]{
    border: solid 1px #CCC;
    float: left;
}

.form-field .wide{
    width: 280px;
}


.form-field select, .form-field input[type=text], .form-field input[type=password]{
    width: 160px;
}

.form-field label.checkbox, .form-field .checkboxGroup label{
    float: left;
}
.form-field input[type=checkbox]{
    margin-left: 160px;
    float: left;
    clear: left;
}
.form-field .codepress{
    width: 480px;
    height: 400px;
}
.form-field .tinymce{
    width: 480px;
    height: 400px;
}
.jfx-thickbox .form-field .tinymce, .jfx-thickbox .form-field .codepress{
    width: 400px;
}

em.required{
	position: absolute;
	left: 160px;
}
strong.error{
	position: absolute;
	left: 356px;
	color: red;
	font-weight: bold;
	white-space: nowrap;
}
CSS;

$dbParams = array(
    'keyname' => 'forms',
    'is_default' => 1,
    'sorting' => 0,
    'browser_version' => ''
);

$cssid = $DB->insert($CONFIG->dbprefix.'jfxcss_stylesheets', $dbParams);

$fh = fopen($this->dirname.'/files/'.$cssid.'.css', 'w');
fwrite($fh, $css);
fclose($fh);

















/**
 * Drop menu
 */






$css = <<<CSS

@charset "UTF-8";

/**
 * Horizontal CSS Drop-Down Menu Module
 *
 * @file		dropdown.css
 * @package		Dropdown
 * @version		0.7.1
 * @type		Transitional
 * @stacks		597-599
 * @browsers	Windows: IE6+, Opera7+, Firefox1+
 *				Mac OS: Safari2+, Firefox2+
 *
 * @link		http://www.lwis.net/
 * @copyright	2006-2008 Live Web Institute. All Rights Reserved.
 *
 */

ul.dropdown,
ul.dropdown li,
ul.dropdown ul {
 list-style: none;
 margin: 0;
 padding: 0;
display: block;
white-space: nowrap;
}

ul.dropdown {
 position: relative;
 z-index: 99;
 float: left;
}

ul.dropdown li {
 float: left;
 line-height: 1.3em;
 vertical-align: middle;
 zoom: 1;
}

ul.dropdown li.hover,
ul.dropdown li:hover {
 position: relative;
 z-index: 599;
 cursor: default;
}

ul.dropdown ul {
 visibility: hidden;
 position: absolute;
 top: 100%;
 left: 0;
 z-index: 598;
 width: 100%;
}

ul.dropdown ul li {
 float: left;
}

ul.dropdown ul ul {
 top: 1px;
 left: 99%;
}








@charset "UTF-8";

/**
 * Default CSS Drop-Down Menu Theme
 *
 * @file		default.css
 * @name		Default
 * @version		0.1
 * @type		transitional
 * @browsers	Windows: IE5+, Opera7+, Firefox1+
 *				Mac OS: Safari2+, Firefox2+
 *
 * @link		http://www.lwis.net/
 * @copyright	2008 Live Web Institute. All Rights Reserved.
 *
 * Module Classes: *.dir {} *.on {} *.open {} li.hover {} li.first {} li.last {}
 * Expected directory tag - li
 *
 */

@import "helper.css";


/*-------------------------------------------------/
 * @section		Base Drop-Down Styling
 * @structure	ul (unordered list)
 *				ul li (list item)
 *				ul li a (links)
 *				/*\.class|(li|a):hover/
 * @level sep	ul
 */


ul.dropdown {
 font-weight: bold;
}

	ul.dropdown li {
	 padding: 7px 10px;
	 border-style: solid;
	 border-width: 1px 1px 1px 0;
	 border-color: #fff #d9d9d9 #d9d9d9;
	 background-color: #f6f6f6;
	 color: #000;
	}

	ul.dropdown li.hover,
	ul.dropdown li:hover {
	 background-color: #eee;
	 color: #000;
	}

	ul.dropdown a:link,
	ul.dropdown a:visited	{ color: #000; }
	ul.dropdown a:hover		{ color: #000; }
	ul.dropdown a:active	{ color: #ffa500; }


	/* -- level mark -- */

	ul.dropdown ul {
	 margin-top: 1px;
	}

		ul.dropdown ul li {
		 font-weight: normal;
		}



/*-------------------------------------------------/
 * @section		Support Class `dir`
 * @level sep	ul, .class
 */


ul.dropdown *.dir {
 padding-right: 20px;
 background-image: url(images/nav-arrow-down.png);
 background-position: 100% 50%;
 background-repeat: no-repeat;
}


/* -- Components override -- */

ul.dropdown-horizontal ul *.dir {
 padding-right: 15px;
 background-image: url(images/nav-arrow-right.png);
 background-position: 100% 50%;
 background-repeat: no-repeat;
}

ul.dropdown-upward *.dir {
 background-image: url(images/nav-arrow-top.png);
}

ul.dropdown-vertical *.dir,
ul.dropdown-upward ul *.dir {
 background-image: url(images/nav-arrow-right.png);
}

ul.dropdown-vertical-rtl *.dir {
 padding-right: 10px;
 padding-left: 15px;
 background-image: url(images/nav-arrow-left.png);
 background-position: 0 50%;
}

ul.dropdown li:hover > ul {
 visibility: visible;
}


CSS;

$dbParams = array(
    'keyname' => 'ultimatedropdownmenu',
    'is_default' => 1,
    'sorting' => 0,
    'browser_version' => ''
);

$cssid = $DB->insert($CONFIG->dbprefix.'jfxcss_stylesheets', $dbParams);

$fh = fopen($this->dirname.'/files/'.$cssid.'.css', 'w');
fwrite($fh, $css);
fclose($fh);









$this->resetLanguages();






